<?php

	$str = "ababcabcd";
	$res = FirstNotRepeatingChar($str);
	print_r($res);

	function FirstNotRepeatingChar($str){
		$arr = str_split($str,1);
		$num = array_count_values($arr);
		// foreach ($num as $k => $v) {
		// 	if ($v == 1) {
		// 		$re = $v;
		// 	}elseif ($v == '') {
		// 		$re = -1;
		// 	}
		// }
		rsort($num);
		return $num;
	}
 ?>